package com.obas.access.business.service.impl;

import com.ease.common.vo.MapParameter;
import com.ease.platform.access.service.impl.AbstractParameterizedBeanIbatisAccessServiceImpl;
import com.obas.access.business.service.SlotAccessService;
import com.obas.model.business.Slot;

public class SlotAccessServiceImpl extends AbstractParameterizedBeanIbatisAccessServiceImpl<Slot> implements SlotAccessService {

	public Slot findByDeviceIdAndCode(long deviceId, String code) {
		MapParameter parameter = new MapParameter();
		parameter.put(Slot.Attribute_deviceId, deviceId);
		parameter.put(Slot.Attribute_code, code);
		return this.findOne(parameter);
	}

	public Slot findSubslotBySlotIdAndCode(long slotId, String code) {
		MapParameter parameter = new MapParameter();
		parameter.put(Slot.Attribute_slotId, slotId);
		parameter.put(Slot.Attribute_code, code);
		return this.findOne(parameter);
	}

}
